package com.bwhx.eruler.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bwhx.eruler.bean.Buyer;
import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.dao.BuyerDao;
import com.bwhx.eruler.service.BuyerService;

/**
 * @Description:
 */
@Service
public class BuyerServiceImpl implements BuyerService {
	@Autowired 
	BuyerDao buyerDao;

	//带条件查询
	public List<Buyer> find(Buyer buyer) {
		return buyerDao.find(buyer);
	}

	
	public Buyer get(Serializable id) {
		return buyerDao.get(id);
	}

	
	public void insert(Buyer buyer) {
		buyerDao.insert(buyer);
		
	}

	
	public void update(Buyer buyer) {
		buyerDao.update(buyer);
		
	}

	
	public void delete(Serializable id) {

		buyerDao.delete(id);
		
	}

	
	public void delete(Serializable[] ids) {
		// TODO Auto-generated method stub
		
	}


	@Override
	public List<Buyer> findByName(String buyername) {
		
		return buyerDao.findByName(buyername);
	}


	@Override
	public int insertSN() {
		// TODO Auto-generated method stub
		return buyerDao.insertSN();
	}


	@Override
	public void inputBuyer(Buyer s) {
		buyerDao.inputBuyer(s);		
	}


	@Override
	public List<Buyer> list(Page p) {
		return buyerDao.list(p);
	}


	@Override
	public Integer count(Buyer s) {
		return buyerDao.count(s);

	}




	@Override
	public List<Buyer> listAll() {
		return buyerDao.listAll();
	}


	@Override
	public Buyer findByLoginName(String loginName) {
		return buyerDao.findByLoginName(loginName);
	}


	@Override
	public Buyer findByBName(String getbName) {
		return buyerDao.findByBName(getbName);
	}


	@Override
	public Buyer getBySDKID(String string) {
		return buyerDao.getBySDKID(string);
	}


	@Override
	public Buyer findByBNameAndBCode(Buyer buyer) {
 		return buyerDao.findByBNameAndBCode(buyer);
	}

}
